package nju.mscs.data.object;

import java.io.Serializable;

public class User implements Serializable{
	
	public static final int CASHIER = 0;
	public static final int GENERAL_MANAGER = 1;
	public static final int SHOP_MANAGER = 2;
	public static final int SYSTEM_MANAGER = 3;
	
	private static final String[] TYPE_LIST =
		{"cashier","general manager","shop manager","system manager"};
	private String name;
	private String id;
	private String password;
	private int type;
	private int adress;
	public User(String n,String p ,String i,int t,int add){
		name = n;
		password = p;
		id = i;
		type = t;
		adress=add;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public int getType(){
		return type;
	}
	public String getTypeName() {
		return TYPE_LIST[type];
	}
	public void setType(int type) {
		this.type = type;
	}
	public int getAdress() {
		return adress;
	}
	public void setAdress(int adress) {
		this.adress = adress;
	}
}
